package com.prs.crm.domain.purchase;

/**
 * @author 兰小刚
 * @version 创建时间：2010-7-15 上午10:21:28 类说明
 */
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.prs.crm.domain.FlowCodeEntity;
import com.prs.crm.domain.fs.BankAccount;
import com.prs.crm.domain.fs.BillType;
import com.prs.crm.domain.fs.PayWay;

@Entity
@Table(name = "purchase_paymentdetail")
public class PaymentDetails extends FlowCodeEntity {

	private static final long serialVersionUID = -4867503240956693033L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne
	private BankAccount bankAccounts;
	
	@OneToOne
	private Votecounting votecounting;

	@ManyToOne
	private PaymentGather paymentGather;
	/**
	 * 付款金额
	 * 
	 * @return
	 */
	private Double payMony;

	/**
	 * 应付日期
	 * 
	 * @return
	 */
	private Date payDate;

	/**
	 * 实付日期
	 * 
	 * @return
	 */
	private Date realityDate;
	/**
	 * 实付金额
	 * 
	 * @return
	 */
	private Double realityMony;

	/**
	 * 付款方式
	 * 
	 * @return
	 */
	@ManyToOne
	private PayWay payWay;
	/**
	 * 开票日期
	 * 
	 * @return
	 */
	private Date billDate;
	/**
	 * 票据类型
	 * 
	 * @return
	 */
	@ManyToOne
	private BillType billtype;

	/**
	 * 票据单号
	 * 
	 * @return
	 */
	private String billCode;

	/**
	 * 付款状态
	 * 
	 * @return
	 */

	@Column(columnDefinition = "Integer(11) default '1'")
	private int payState;
	/**
	 * 开票状态
	 * 
	 * @return
	 */

	@Column(columnDefinition = "Integer(11) default '1'")
	private int billState;

	public PaymentGather getPaymentGather() {
		return paymentGather;
	}

	public void setPaymentGather(PaymentGather paymentGather) {
		this.paymentGather = paymentGather;
	}

	public Double getPayMony() {
		return payMony;
	}

	public void setPayMony(Double payMony) {
		this.payMony = payMony;
	}

	public Date getPayDate() {
		return payDate;
	}

	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public Double getRealityMony() {
		return realityMony;
	}

	public void setRealityMony(Double realityMony) {
		this.realityMony = realityMony;
	}

	public Date getBillDate() {
		return billDate;
	}

	public void setBillDate(Date billDate) {
		this.billDate = billDate;
	}

	public String getBillCode() {
		return billCode;
	}

	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}

	public int getPayState() {
		return payState;
	}

	public void setPayState(int payState) {
		this.payState = payState;
	}

	public int getBillState() {
		return billState;
	}

	public void setBillState(int billState) {
		this.billState = billState;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public BillType getBilltype() {
		return billtype;
	}

	public void setBilltype(BillType billtype) {
		this.billtype = billtype;
	}

	public PayWay getPayWay() {
		return payWay;
	}

	public void setPayWay(PayWay payWay) {
		this.payWay = payWay;
	}

	public BankAccount getBankAccounts() {
		return bankAccounts;
	}

	public void setBankAccounts(BankAccount bankAccounts) {
		this.bankAccounts = bankAccounts;
	}

	public Date getRealityDate() {
		return realityDate;
	}

	public void setRealityDate(Date realityDate) {
		this.realityDate = realityDate;
	}

	public Votecounting getVotecounting() {
		return votecounting;
	}

	public void setVotecounting(Votecounting votecounting) {
		this.votecounting = votecounting;
	}

}
